package com.wgc.order;

import com.wgc.filter.FeignInterceptor;
import com.wgc.config.TokenDecode;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages ={ "com.wgc.goods.feign","com.wgc.cart.feign","com.wgc.ALpay.feign"})
@MapperScan("com.wgc.order.mapper")
public class OrderMain {
    public static void main(String[] args) {
        SpringApplication.run(OrderMain.class, args);
    }
    @Bean
    public FeignInterceptor feignInterceptor(){
        return new FeignInterceptor();
    }
    @Bean
    public TokenDecode tokenDecode(){
        return new TokenDecode();
    }

}

